<?php

namespace plugin\laoha\app\model;

use DateTimeInterface;
use support\Model;
use Illuminate\Database\Eloquent\Relations\Relation;

class Base extends Model
{    


    /**
     * @var string
     */
    protected $connection = 'plugin.admin.mysql';

    /**
     * 格式化日期
     *
     * @param DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * 允许自增自减字段
     */
    protected $add_fields = [];

    /**
     * 允许执行act名称
     */
    protected $acts = [];    

    /**
     * 不允许修改字段
     */    
    protected $dis_update_fields=[];

    public function getAddFields()
    {
        return $this->add_fields;
    }

    public function getDisUpdateFields()
    {
        return $this->dis_update_fields;
    }

    public function getActs()
    {
        return $this->acts;
    }

    public function dis_update_fields(){
        return $this->dis_update_fields;
    }

}
